-
Notifications
You must be signed in to change notification settings - Fork 0
Java06. ДЗ 02, Горячева Валерия #2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
sproshev
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
зачтено с замечаниями по reset/content/checkout, исправить можно в 3
| import java.io.*; | ||
| import java.nio.charset.StandardCharsets; | ||
|
|
||
| public class Message { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
про эту штуку вроде писал в 1
|
|
||
| public void print() { | ||
| System.out.print(read()); | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unused
|
|
||
| public BlobType type; | ||
| public String name; | ||
| public InputStream content; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
лучше путь или что-то такое, что точно не хранит в себе системные ресурсы, а здесь может быть поток с открытым файловым дескриптором
и он нигде не закрывается (((
| return include; | ||
| } | ||
| } | ||
| ).collect(Collectors.toList()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
перенеслось
| GitFileKeeper.clearDirectory(tree.index()); | ||
| fileKeeper.restoreCommit(references, tree.index()); | ||
| clerk.changeHeadInfo(revision); | ||
| return new CommandResult(ExitStatus.SUCCESS, "reset: done!"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
не очищается storage
| if (!GitFileKeeper.checkFilesExist(files)) { | ||
| return new CommandResult(ExitStatus.FAILURE, ""); | ||
| } | ||
| GitFileKeeper.copyAll(files, tree.index(), tree.repo()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
checkout должен происходить не из индекса, а storage
No description provided.